package com.xiaoyy.core.oplog.dao.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 业务日志主表历史表
 * </p>
 *
 * @author chenzh
 * @since 2020-06-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("OPLOG_HISTORY")
@ApiModel(value="OplogHistory对象", description="业务日志主表历史表")
public class OplogHistory extends Model<OplogHistory> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "操作日志id")
    @TableId(value = "OPLOG_ID", type = IdType.INPUT)
    private Long oplogId;

    @ApiModelProperty(value = "业务所属行政区划")
    @TableField("AREA_CODE")
    private String areaCode;

    @ApiModelProperty(value = "路由id")
    @TableField("ROUTER_ID")
    private String routerId;

    @ApiModelProperty(value = "功能id")
    @TableField("FUNC_ID")
    private String funcId;

    @ApiModelProperty(value = "标题（路由+功能）")
    @TableField("TITLE")
    private String title;

    @ApiModelProperty(value = "业务类型")
    @TableField("OPERATION_TYPE")
    private String operationType;

    @ApiModelProperty(value = "业务名称")
    @TableField("OPERATION_NAME")
    private String operationName;

    @ApiModelProperty(value = "业务年月")
    @TableField("DATE_YM")
    private Integer dateYm;

    @ApiModelProperty(value = "数据类型")
    @TableField("DATA_TYPE")
    private String dataType;

    @ApiModelProperty(value = "数据id")
    @TableField("DATA_ID")
    private String dataId;

    @ApiModelProperty(value = "组织id")
    @TableField("ORG_ID")
    private String orgId;

    @ApiModelProperty(value = "批量业务标识 0 否 1 是")
    @TableField("BATCH_FLAG")
    private String batchFlag;

    @ApiModelProperty(value = "有效标志 0 有效 1无效")
    @TableField("STATUS")
    private String status;

    @ApiModelProperty(value = "操作用户id")
    @TableField("OP_USER_ID")
    private String opUserId;

    @ApiModelProperty(value = "操作员姓名")
    @TableField("OP_NAME")
    private String opName;

    @ApiModelProperty(value = "操作时间")
    @TableField("OP_TIME")
    private Date opTime;

    @ApiModelProperty(value = "摘要")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "自定参数1")
    @TableField("PARAM1")
    private String param1;

    @ApiModelProperty(value = "自定参数2")
    @TableField("PARAM2")
    private String param2;

    @ApiModelProperty(value = "自定参数3")
    @TableField("PARAM3")
    private String param3;

    @ApiModelProperty(value = "自定参数4")
    @TableField("PARAM4")
    private String param4;

    @ApiModelProperty(value = "组织单位编码")
    @TableField("ORG_CODE")
    private String orgCode;

    @ApiModelProperty(value = "是否允许回退 0 否 1 是")
    @TableField("ROLLBACK_FLAG")
    private String rollbackFlag;

    @ApiModelProperty(value = "是否需要审核 0 不需要 1需要")
    @TableField("AUDIT_FLAG")
    private String auditFlag;

    @ApiModelProperty(value = "人员id")
    @TableField("PERSON_ID")
    private Long personId;

    @ApiModelProperty(value = "最终审核状态 0 未审核 1 审核通过 2 审核不通过")
    @TableField("AUTH_STATUS")
    private String authStatus;

    @ApiModelProperty(value = "最终审核说明")
    @TableField("AUTH_REMARKS")
    private String authRemarks;

    @ApiModelProperty(value = "最终审核人")
    @TableField("AUTH_USER_ID")
    private String authUserId;

    @ApiModelProperty(value = "最终审核时间")
    @TableField("AUTH_TIME")
    private Date authTime;

    @ApiModelProperty(value = "登入token")
    @TableField("ACCESS_TOKEN")
    private String accessToken;

    @ApiModelProperty(value = "定位位置 行政区划")
    @TableField("LOCATION_AREA")
    private String locationArea;

    @ApiModelProperty(value = "登入类型：微信 单点登录")
    @TableField("LOGIN_TYPE")
    private String loginType;

    @ApiModelProperty(value = "应用id")
    @TableField("CLIENT_ID")
    private String clientId;

    @ApiModelProperty(value = "用户类型")
    @TableField("USER_TYPE")
    private String userType;

    @ApiModelProperty(value = "第三方id")
    @TableField("OPEN_ID")
    private String openId;

    @ApiModelProperty(value = "登入方设备类型 pc app")
    @TableField("EQUIPMENT_TYPE")
    private String equipmentType;

    @ApiModelProperty(value = "系统版本号")
    @TableField("VERSION")
    private String version;

    @ApiModelProperty(value = "系统编号")
    @TableField("SYSTEM_CODE")
    private String systemCode;

    @ApiModelProperty(value = "系统名称")
    @TableField("SYSTEM_NAME")
    private String systemName;

    @ApiModelProperty(value = "登入方设备id")
    @TableField("EQUIPMENT_ID")
    private String equipmentId;

    @ApiModelProperty(value = "回退人")
    @TableField("RB_USER_ID")
    private String rbUserId;

    @ApiModelProperty(value = "回退原因")
    @TableField("RB_REMARKS")
    private String rbRemarks;

    @ApiModelProperty(value = "回退时间")
    @TableField("RB_TIME")
    private Date rbTime;

    @ApiModelProperty(value = "回退状态 0 未回退 1 已回退")
    @TableField("RB_STATUS")
    private String rbStatus;

    @ApiModelProperty(value = "联办日志id")
    @TableField("UNION_OPLOG_ID")
    private Long unionOplogId;

    @Override
    protected Serializable pkVal() {
        return this.oplogId;
    }

}
